const setStorage = (key,value)=>{

  try {
    wx.setStorageSync(key, value)
  } catch (error) {
    console.error(key+'数据存储失败',error)
  }

}


const getStorageSync = (key)=>{

  try {
    wx.getStorageSync(key, value)
  } catch (error) {
    console.error(key+'数据获取失败',error)
  }

}

const removeStorageSync = (key)=>{

  try {
    wx.removeStorageSync(key, value)
  } catch (error) {
    console.error(key+'数据清除失败',error)
  }

}

const clearStorageSync = ()=>{

  try {
    wx.clearStorageSync()
  } catch (error) {
    console.error('清除所有数据失败',error)
  }

}


export {
  setStorage,
  clearStorageSync,
  removeStorageSync,
  getStorageSync
}